<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
    <link rel="stylesheet" href="plug/css/css.css">
</head>
<script src="plug/js/jquery-1.9.1.min.js"></script>
<script src="plug/js/jquery.validate.min.js"></script>
<script src="plug/js/messages_zh.js"></script>
<script src="plug/js/countdown.js"></script>
<script>
function sub() {
        $.ajax({
            url:"../login",
            data:$("#fm").serialize(),
            type:"post",
            success:function (res) {
                if (res>0){
                    location.assign("list")
                }else{
                    alert("用户名或者密码错误")
                }
            }
        })
    }
</script>
<body>

<form id="fm">
    <input type="text" name="username"><br>
    <input type="text" name="password"><br>
    <input type="button" value="登录" onclick="sub()">
</form>


<script>
</script>
</body>
</html>